home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Presentations / Presentations ’96 / Sessions ’96 / ODF- Easy OpenDoc / MacHack(4) / Sources / Part.h < prev    next >
Encoding:
Text File  |  1996-06-18  |  2.2 KB  |  77 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Part.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef PART_H
  11. #define PART_H
  12.  
  13. // ----- Framework Includes -----
  14.  
  15. #ifndef FWPART_H
  16. #include "FWPart.h"
  17. #endif
  18.  
  19. //========================================================================================
  20. // Forward Class Desclarations
  21. //========================================================================================
  22.  
  23. class FW_CShape;
  24.  
  25. //========================================================================================
  26. //    CLASS CMacHackPart
  27. //========================================================================================
  28.  
  29. class CMacHackPart : public FW_CPart
  30. {
  31. public:
  32.     FW_DECLARE_AUTO(CMacHackPart)
  33.  
  34. //----------------------------------------------------------------------------------------
  35. //    Initialization/Destruction
  36. //
  37. public:
  38.     CMacHackPart(ODPart* odPart);
  39.     virtual ~CMacHackPart();
  40.  
  41.     virtual void Initialize(Environment* ev);
  42.     
  43. //----------------------------------------------------------------------------------------
  44. //    Inherited API
  45. //
  46. public:
  47.     virtual FW_CContent*     NewPartContent(Environment* ev);
  48.     virtual FW_CFrame*         NewFrame(Environment* ev,
  49.                                     ODFrame* odFrame, 
  50.                                     FW_CPresentation* presentation,
  51.                                     FW_Boolean fromStorage);
  52.     virtual FW_Boolean        DoMenu(Environment* ev, const FW_CMenuEvent& theMenuEvent);
  53.     virtual FW_Boolean        DoAdjustMenus(Environment* ev, FW_CMenuBar* menuBar, FW_Boolean hasMenuFocus, FW_Boolean isRoot);
  54.  
  55. //----------------------------------------------------------------------------------------
  56. //    New API
  57. //
  58. public:
  59.     FW_CShape*                GetShape(short index) const
  60.                                 {return fShapes[index];}
  61.  
  62. private:
  63.     void                    ChangeGeometry(Environment* ev, ODCommandID geometry);
  64.     void                    CreateShapes();
  65.     void                    DeleteShapes();
  66.     
  67. //----------------------------------------------------------------------------------------
  68. //    Data Member
  69. //
  70. private:
  71.     FW_CPresentation*    fPresentation;
  72.     FW_CShape*            fShapes[3];
  73.     ODCommandID            fGeometry;
  74. };
  75.  
  76. #endif
  77.